package edu.ptu.acl.dto;

import edu.ptu.acl.entity.Dept;
import lombok.Getter;
import lombok.Setter;
import org.springframework.beans.BeanUtils;

import java.util.List;

@Getter
@Setter
public class DeptTreeDto extends Dept {

    private List<DeptTreeDto> sonDeptTreeList;

    public static DeptTreeDto copyDept(Dept dept){
        DeptTreeDto deptTreeDto = new DeptTreeDto();
        BeanUtils.copyProperties(dept,deptTreeDto);
        return deptTreeDto;
    }

}
